package com.cyzy.mapper;

import com.cyzy.pojo.TrainUser;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {

    //登录
    TrainUser login(
            @Param("userAcc") String userAcc,
            @Param("userPwd") String userPwd);

    //判断账号是否存在
    TrainUser getUserByAcc(@Param("userAcc") String userAcc);
    //注册
    int addUser(TrainUser trainUser);

    //修改用户信息
    int updateUser(TrainUser trainUser);

    //根据id查询
    TrainUser selectById(@Param("userId") long userId);

    //修改用户余额
    int userMoney(@Param("userId") long userId
            , @Param("userMoney") long userMoney);
}
